<?php
include_once("../modules/checkA.php");
include_once("../../config.php");

if(($_SESSION['mid']=="admin")||($_SESSION['mid']=="finance"))
{
$plate=select_one_line_all_items($table_Prefix."plate","mid = 'user'");
}
else{
$plate=select_one_line_all_items($table_Prefix."plate","mid = 'employee'");

}
?>


<?
//用来判断当前系统属于什么板块
$system_part = $plate['mid'];
include_once("detail-function.php");
?>
 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php include_once(ROOT_PATH_.'/controlbase/modules/head.php'); ?>
</head>

<body>

<div id="topbar"><?php include ROOT_PATH_.'/controlbase/modules/topbar.php'; ?></div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controlbase/modules/sidebar.php'; ?>
        </div>


<div id="content" class="layui-form">
<h1> 个人中心 </h1>




<div class="detail-box user-edit-box layui-form">

<div class="detail-boxes">

    <div class="statistic-box layui-form">

        <div class="layui-tab">
            <ul class="layui-tab-title">
<!--                <li> 用户资料 </li>-->
<li  class="layui-this"><a href="detail-reset-pw.php?nav-itemed=user&nid=<?echo $_SESSION['nid'];?>" >修改密码</a></li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show statistic-department-info"> <? include 'statistic-department-info.php';?>  </div>

            </div>
        </div>



        <form id="edit-member-form" method="post" action="detail-edit-function.php?nav-itemed=employee" enctype="multipart/form-data" class="layui-form">


            <input type="hidden" name="nid" value="<? echo $detail['nid']?>">


            <div class="layui-form-item">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-block">
                    <input type="text" name="name" required  lay-verify="required" placeholder="请输入名字" autocomplete="off" class="layui-input" value="<? echo $detail['name']?>">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">工号</label>
               <div class="layui-input-block">
                    <input type="text" name="mid" required  lay-verify="required" placeholder="请输入名字" autocomplete="off" class="layui-input" value="<? echo $detail['mid']?>">
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">教练员</label>
                <div class="layui-input-block">
                    <input type="radio" name="coach" value="1" title="是"
                        <? if($detail['coach']=="1"){echo "checked";} ?>
                        >
                    <input type="radio" name="coach" value="0" title="否"
                        <? if($detail['coach']=="0"){echo "checked";} ?>
                        >
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">身份证号</label>
                <div class="layui-input-block">
                    <input type="text" name="idnumber" placeholder="请输入身份证号" autocomplete="off" class="layui-input" value="<? echo $detail['idnumber']?>">
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">性别</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="男" title="男"
                            <? if($detail['sex']=="男"){echo "checked";} ?>
                            >
                        <input type="radio" name="sex" value="女" title="女"
                            <? if($detail['sex']=="女"){echo "checked";} ?>
                            >
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">电话</label>
                    <div class="layui-input-block">
                        <input type="text" name="phone" placeholder="请输入电话" autocomplete="off" class="layui-input" value="<? echo $detail['phone']?>">
                    </div>
                </div>



                <div class="layui-form-item">
                    <label class="layui-form-label">入职日期</label>
                    <div class="layui-input-block">

                        <input type="text" name="applydate" id="date" autocomplete="off" class="layui-input"  value="<? echo $detail['applydate']?>" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon">
                    </div>
                </div>



                <div class="layui-form-item">
                    <label class="layui-form-label">离职日期</label>
                    <div class="layui-input-block">

                        <input type="text" name="leavedate" id="date" autocomplete="off" class="layui-input"  value="<? echo $detail['leavedate']?>" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" class="laydate-icon">
                    </div>
                </div>




                <div class="layui-form-item">
                    <label class="layui-form-label">生日</label>
                    <div class="layui-input-block">

                        <input type="text" name="birthday" id="date" autocomplete="off" class="layui-input"  value="<? echo $detail['birthday']?>" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" class="laydate-icon">
                    </div>
                </div>






                <div class="layui-form-item">
                    <label class="layui-form-label">教员资格</label>
                    <div class="layui-input-block">
                        <select name="license"><i class="layui-icon"></i>>
                            <option value="<? echo $detail['license']?>"><? echo $detail['license']?></option>
                            <option value="无">无</option>
                            <option value="A1">A1 : 大型客车 大型载客汽车</option>

                            <option value="A2">A2 : 牵引车 重型、中型全挂、半挂汽车列车</option>

                            <option value="A3">A3 : 城市公交车 核载10人以上的城市公共汽车</option>

                            <option value="B1">B1 : 中型客车 中型载客汽车</option>

                            <option value="B2">B2 : 大型货车 重型、中型载货汽车；大、重、中型专项作业车</option>

                            <option value="C1">C1 : 小型汽车 小型、微型载客汽车以及轻型、微型载货汽车、轻、小、微型专项作业车</option>

                            <option value="C2">C2 : 小型自动挡汽车 小型、微型自动挡载客汽车以及轻型、微型自动挡载货汽车</option>

                            <option value="C3">C3 : 低速载货汽车 速载货汽车（原四轮农用运输车)</option>

                            <option value="C4">C4 : 三轮汽车 三轮汽车（原三轮农用运输车</option>

                            <option value="D">D : 普通三轮摩托车 发动机排量大于50ml或者最大设计车速大于50km/h的三轮摩托车</option>

                            <option value="E">E : 普通二轮摩托车 发动机排量大于50ml或者最大设计车速大于50km/h的二轮摩托车</option>

                            <option value="F">F : 轻便摩托车 发动机排量小于等于50ml，最大设计车速小于等于50km/h的摩托车</option>

                            <option value="M">M : 轮式自行机械车 轮式自行机械车</option>

                            <option value="N">N : 无轨电车 无轨电车</option>

                            <option value="P">P : 有轨电车 有轨电车 无</option>



                        </select>
                    </div>
                </div>



                <? $department_list=select_lines_all_items($table_Prefix."department","nid desc","","0"); ?>

                <div class="layui-form-item">
                    <label class="layui-form-label">部门</label>
                    <div class="layui-input-block">
                        <select name="departmentid" >

                            <? $department=select_one_line_all_items($table_Prefix."department","nid = '".$detail['departmentid']."'")?>
                            <option value="<? echo $detail['departmentid']?>" ><?echo $department['name']?></option>
                            <?for($i=0;$i<count($department_list);$i++){?>

                                <option value="<? echo $department_list[$i]['nid'] ?>"><? echo $department_list[$i]['name'] ?></option>
                            <? } ?>
                        </select>
                    </div>
                </div>



                <div class="layui-form-item">
                    <label class="layui-form-label">岗位</label>
                    <div class="layui-input-block">
                        <input type="text" name="position" placeholder="请输职员所在岗位" autocomplete="off" class="layui-input" value="<? echo $detail['position']?>">
                    </div>
                </div>




                <div class="layui-form-item">
                    <label class="layui-form-label">登陆权限</label>
                    <div class="layui-input-block">
                        <input type="radio" name="authority" value="是" title="是"
                            <? if($detail['authority']=="是"){echo "checked";} ?>
                            >
                        <input type="radio" name="authority" value="否" title="否"
                            <? if($detail['authority']=="否"){echo "checked";} ?>
                            >
                    </div>
                </div>




                <div class="layui-form-item">
                    <label class="layui-form-label">状态</label>
                    <div class="layui-input-block">
                        <input type="radio" name="status" value="在职" title="在职"
                            <? if($detail['status']=="在职"){echo "checked";} ?>
                            >

                        <input type="radio" name="status" value="休假" title="休假"
                            <? if($detail['status']=="休假"){echo "checked";} ?>
                            >

                        <input type="radio" name="status" value="辞职" title="辞职"
                            <? if($detail['status']=="辞职"){echo "checked";} ?>
                            >
                        <input type="radio" name="status" value="辞退" title="辞退"
                            <? if($detail['status']=="辞退"){echo "checked";} ?>
                            >
                        <input type="radio" name="status" value="休假" title="休假"
                            <? if($detail['status']=="休假"){echo "checked";} ?>
                            >

                        <input type="radio" name="status" value="带薪假期" title="带薪假期"
                            <? if($detail['status']=="带薪假期"){echo "checked";} ?>>
                    </div>
                </div>




                <div class="layui-form-item">
                    <label class="layui-form-label">工资</label>
                    <div class="layui-input-block">
                        <input type="text" name="salary" placeholder="请输入基本工资" autocomplete="off" class="layui-input" value="<? echo $detail['salary']?>">
                    </div>
                </div>



<?if(($_SESSION['mid']=="admin")||($_SESSION['mid']=="finance"))

{?>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <textarea name="remark" placeholder="备注" class="layui-textarea"><? echo $detail['remark']?></textarea>
                    </div>
                </div>
<?;}?>



</ul>
</div>
</div>

<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>


<?php include_once('../modules/footer.php'); ?>
</body>
</html>
